package com.changgou.canal.util;

import com.alibaba.otter.canal.protocol.CanalEntry;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CanalUtil {
    /**
     * 将列集合转成map
     */

    public static Map<String,String> convertoMap(List<CanalEntry.Column>columnList){
        HashMap<String, String> map = new HashMap<>();
        columnList.forEach(c->map.put(c.getName(),c.getValue())
        );
        return map;
    }
}
